#pragma once

#include <sstream>
#include <zmqpp/zmqpp.hpp>
#include "base/Logger.h"

namespace zeroplus::mq
{
    class MonitorEvent
    {
    public:
        explicit MonitorEvent(const zmq_event_t &zmq_event, const std::string &address)
        {
            eventInfo_ = zmq_event;
            address_ = address;
        }

        std::string ToString()
        {
            std::ostringstream ss;
            ss << "address: " << address_;
            ss << ", event: " << eventInfo_.event << ",  value: " << eventInfo_.value;
            return ss.str();
        }

    private:
        zmq_event_t eventInfo_;
        std::string address_;
    };
}
